import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:模拟登陆
 * User: zjc
 * Date: 2022-04-26
 * Time: 16:58
 */
public class javadem {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String password = "123456";
        for ( int i = 1 ; i <= 3 ; i++) {
            String a = sc.nextLine();
            if (a.equals(password)) {         //字符串相等用   字符串一.equals(字符串二)
                System.out.println("登录成功");
                break;
            } else {
                if(i <= 2) {
                    System.out.println("密码错误，请重新输入");
                }
                else{
                    System.out.println("密码错误三次，已退出");
                }
            }
        }
    }
}
